package juc;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/5/31
 * Time:15:38
 * GC 计数器算法
 **/
public class Demo5 {
    //创建一个大对象
    private byte[] bytes = new byte[5*1024*1024];
    //创建
    public Demo5 obj = null;

    public static void main(String[] args) {
        Demo5 t1 = new Demo5();
        Demo5 t2 = new Demo5();

        //循环引用
        t1.obj = t2;
        t2.obj = t1;

        //释放对象
        t1 = null;
        t2 = null;


    }
}
